package ch8.Swim;

public class Fish implements Swim {
    private String variety,colour;//品种，颜色

    public Fish(String variety, String colour) {
        this.variety = variety;
        this.colour = colour;
    }

    @Override
    public String toString() {
        return "这是一条" + colour + "的" + variety;
    }

    @Override
    public void swim() {
        System.out.println("它在大海里快乐的游来游去。");
    }

    public String getVariety() {
        return variety;
    }

    public void setVariety(String variety) {
        this.variety = variety;
    }

    public String getColour() {
        return colour;
    }

    public void setColour(String colour) {
        this.colour = colour;
    }
}
